# encoding=utf-8

# x = input("name is:")
# print("你输入了" + x)
# 这是注释
# int:   34  1  2 4  5  7

# b = 5

# a = ["张三", '李四', "王五", "wangcai", "6666"]
# for i in a:
#     print(i)

"""
if
else
elif
for
def
class
while

这些关键字后面 冒号
"""


# 字典   {}  另外的叫法 (js  object)   map

# 我有2份同学名单， 找到张三的同学的名单信息
import sys
# tongxue = [
#     {
#         "name": "张三",
#         "age": 19,
#         "身高": 1.75,
#         "isnan": True,
#         "爱好": ["打篮球", "看书", "玩游戏", "飞机"]
#     },
#     {
#         "身份证": "xxxxxxxxxxxxxxxxxxxxxxxxxx",
#         "name": "卓琪",
#         "age": 19,
#         "身高": 1.63,
#         "isnan": False,
#         "爱好": ["逛街", "看书", "玩游戏", "飞机"]
#     }
# ]


# def f(xingming):
#     # todo
#     # 遍历里面的同学信息
#     # 找到 name 是 xingming
#     # 如果找到了就直接返回
#     return {}


# print(f("张三"))
# print(f("卓琪"))

# # f("张三")
# #     {
# #         "name": "张三",
# #         "age": 19,
# #         "身高": 1.75,
# #         "isnan": True,
# #         "爱好": ["打篮球", "看书", "玩游戏", "飞机"]
# #     }

# # f("卓琪") = {
# #     {
# #         "身份证": "xxxxxxxxxxxxxxxxxxxxxxxxxx",
# #         "name": "卓琪",
# #         "age": 19,
# #         "身高": 1.63,
# #         "isnan": False,
# #         "爱好": ["逛街", "看书", "玩游戏", "飞机"]
# #     }
# # }

# # print(tongxue[1])
# # print(tongxue[0]["身高"])

# # 比较符：   >   < == >=  <=   结果:  bool


# # print("1" == "1")
# b = 1 == 12
# print(not b)
# # 没有酱油，  有生抽和醋
# # 给你5块钱去买酱油(3)，  如果没有酱油就买生抽(3.5),  如果没生抽就买醋，2 你还剩下多少钱
# """
# 如果
# if (条件):
#     如果是真的

# else:
#     如果是假的
# """


# # print(shenyu)

# # 8号上午
# # print("我在1号位置扭螺丝")
# # print("我在2号位置扭螺丝")
# # print("我在3号位置扭螺丝")
# # print("我在4号位置扭螺丝")
# # print("我在5号位置扭螺丝")
# # print("我在6号位置扭螺丝")
# # print("我在7号位置扭螺丝")
# # print("我在8号位置扭螺丝")
# # print("我在9号位置扭螺丝")
# # print("我在10号位置扭螺丝")
# # print("我在11号位置扭螺丝")
# # print("我在12号位置扭螺丝")

# # print("我在1-12号位置扭螺丝")


# for i in range(1, 13):
#     print("我在%d号位置扭螺丝" % i)


# # f(x) = x * x + 3   带入 x = 1,  f(1) = 4
def f(x: int):
    x * x + 3


# def f(shangdianshifouyoujiangyou, shangdianshifouyoushengchou):
#     wodeqian = 5
#     shenyu = 0

#     jiangyou = "酱油"
#     shengchou = "生抽"
#     cu = "醋"

#     if shangdianshifouyoujiangyou:
#         # 我买了酱油
#         shenyu = wodeqian - 3
#         print(jiangyou)
#     elif shangdianshifouyoushengchou:
#         # 我买了生抽
#         shenyu = wodeqian - 3.5
#         print(shengchou)
#     else:
#         # 我买了醋
#         shenyu = wodeqian - 2
#         print(cu)
#     return shenyu


# print(f(True, True))

"""
关键字:
if
else
elif
for
def
class
while
return:  函数
continue： for
break： 退出for循环
"""

# for i in range(1, 13):
#     if i == 10:
#         continue
#     print(i)

"""
基础类型：
int
string
list
dict
"""
sys.dont_write_bytecode = True


class Student():

    def __init__(self, name: str, age: int, height: float, isnan: bool, hobby: list) -> None:
        self.name = name
        self.age = age
        self.height = height
        self.isnan = isnan
        self.hobby = hobby


zhangsan = Student("张三", 19, 1.75, True, ["打篮球", "看书", "玩游戏", "飞机"])
stus = []
# stus.append(zhangsan)
print(zhangsan.name)

zhuoqi = Student("卓琪", 19, 1.63, False, ["逛街", "看书", "玩游戏", "飞机"])
# stus.append(zhuoqi)
print(zhuoqi.name)


# for i in range(len(stus)):
#     # 第一次 ： zhangsan
#     # 第二次 ： zhuoqi
#     print(stus[i].name)
